#ifndef _RF_433_H__
#define _RF_433_H__

#include "include.h"
#include "tx8C1200_gpio.h"

#define RF433_IO    P24

#define TIM_SP_GET()    (u16)(TMR0_CNTH<<8|TMR0_CNTL)

#define TIM_OUT_MAX         1   //异常码
#define TIM_OUT_MIN         1   //

#define TIM_S_MAX       4200    //起始码，只判断低电瓶时间
#define TIM_S_MIN       3800

#define TIM_0_MAX       200    //数据码 0  高电瓶时间
#define TIM_0_MIN       50

#define TIM_1_MAX       450    //数据码 1  高电瓶时间
#define TIM_1_MIN       300

extern bit b_e;
extern u32 rf_addr;

extern xdata u8 rf_value;
extern xdata u8 rf_value_ls;

void RF433_io_init(void);
void RF433_irq_loop(void);
void RF433_sta_loop(void);

#endif


